package com.dnui.seven2.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName buymerch
 */
@Data
public class Buymerch implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private String merchImage;

    /**
     * 
     */
    private Long merchId;
    private Integer merchNumber;
    /**
     * 
     */
    private Long userId;

    /**
     * 
     */
    private LocalDateTime buymerchTime;

    /**
     * 
     */
    private String buymerchAddress;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Buymerch other = (Buymerch) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getMerchImage() == null ? other.getMerchImage() == null : this.getMerchImage().equals(other.getMerchImage()))
            && (this.getMerchId() == null ? other.getMerchId() == null : this.getMerchId().equals(other.getMerchId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getBuymerchTime() == null ? other.getBuymerchTime() == null : this.getBuymerchTime().equals(other.getBuymerchTime()))
            && (this.getBuymerchAddress() == null ? other.getBuymerchAddress() == null : this.getBuymerchAddress().equals(other.getBuymerchAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getMerchImage() == null) ? 0 : getMerchImage().hashCode());
        result = prime * result + ((getMerchId() == null) ? 0 : getMerchId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getBuymerchTime() == null) ? 0 : getBuymerchTime().hashCode());
        result = prime * result + ((getBuymerchAddress() == null) ? 0 : getBuymerchAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", merchImage=").append(merchImage);
        sb.append(", merchId=").append(merchId);
        sb.append(", userId=").append(userId);
        sb.append(", buymerchTime=").append(buymerchTime);
        sb.append(", buymerchAddress=").append(buymerchAddress);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}